Wiki Diff updating oE display_text_image, revision #2 to tip

@[:console:display_text_image|]
==== display_text_image
<eucode>
include std/console.e
namespace console
public procedure display_text_image(text_point xy, sequence text)
</eucode>

displays a text image in any text mode.

===== Parameters:
# ##xy## : a pair of 1-based coordinates representing the point at which to start writing.
# ##text## : a list of sequences of alternated character and attribute.

===== Comments:
This routine displays to the active text page, and only works in text modes.

You might use [[:save_text_image]] and [[:display_text_image]] in a text-mode graphical
user interface, to allow "pop-up" dialog boxes, and drop-down menus to appear and disappear
without losing what was previously on the screen.

===== Example 1:
<eucode>
include std/console.e
clear_screen()
display_text_image({1,1}, {{'A', WHITE, 'B', GREEN},
{'C', RED+16*WHITE},
{'D', BLUE}})
-- displays:
-- AB
-- C
-- D
-- at the top left corner of the screen.
-- 'A' will be white with black (0) background color,
-- 'B' will be green on black,
-- 'C' will be red on white, and
-- 'D' will be blue on black.

-- FIXME!
-- On linux with gnome terminal, items starting on line 1 do not show up at all
-- items on following lines have wrong colors: BLUE = red, YELLOW = cyan, RED = black
-- needs explanation or fixing!
</eucode>

===== See Also:
[[:save_text_image]], [[:put_screen_char]]


Search



Quick Links

User menu

Not signed in.

Misc Menu